﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace CSharpStrengthenTeach
{
    public class NewTeacher : NewPerson
    {
        public NewTeacher() { }

        public NewTeacher(string name, string gender)  //构造方法必须用base
        {
           this.Name = name;
            this.Gender = gender;
        }

        //添加自己的特意属性和方法
        public string Company { get; set; }

        /// <summary>
        /// 这个方法是对父类抽象方法的重写
        /// </summary>
        public override void Play()
        {
            Console.WriteLine("下课去打羽毛球");
        }
    }
}
